package com.douqu.game.main.database.mapper;

import com.douqu.game.core.database.model.PlayerModel;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by bean on 2017/7/17.
 */
public interface PlayerMapper {

    int insert(PlayerModel playerModel);

    int updateBase(PlayerModel playerModel);

    int update(PlayerModel playerModel);

    int updateBag(@Param("bagInfo") byte[] bagInfo,
                  @Param("objectIndex") String objectIndex);

    int updateInstance(@Param("instanceInfo") byte[] instanceInfo,
                  @Param("objectIndex") String objectIndex);

    int updateArenaInfo(@Param("arenaInfo") byte[] arenaInfo,
                  @Param("objectIndex") String objectIndex);

    PlayerModel getPlayerByUid(@Param("uid") Integer uid);

    void updatePasswordByAccount(@Param("s") String s,
                                 @Param("account") String account);


    PlayerModel selectByPrimaryKey(@Param("id") Integer id);

    PlayerModel getPlayerByIndex(@Param("objectIndex") String objectIndex);

    List<PlayerModel> findAll();

    PlayerModel offlineMatch(@Param("grade") int grade,
                             @Param("indexs") String... indexs);

    String offlineMatchIndex(@Param("grade") int grade,
                             @Param("indexs") String... indexs);
}
